ifneq ($(KERNELRELEASE),)
#mymodule-objs:= mymodule 1.o mymodule 2.o
obj-m+=yield.o
obj-m+=wake_up_process.o
obj-m+=wait_for_completion_timeout.o
obj-m+=wait_for_completion_killable.o
obj-m+=wait_for_completion_interruptible_timeout.o
obj-m+=wait_for_completion.o
obj-m+=try_wait_for_completion.o
obj-m+=task_nice.o
obj-m+=set_user_nice.o
obj-m+=set_cpus_allowed_ptr.o
obj-m+=sched_setscheduler.o
obj-m+=remove_wait_queue.o
obj-m+=prepare_to_wait_exclusive.o
obj-m+=prepare_to_wait.o
obj-m+=kthread_stop.o
obj-m+=kthread_create_on_node.o
obj-m+=init_waitqueue_head.o

#obj-m+=mymodule.o

#obj-m+=__module_address.o
#obj-m+=__module_text_address.o
#obj-m+=hello.o
#obj-m+=__print_symbol.o
#obj-m+=__symbol_get.o
#obj-m+=__symbol_put.o
#obj-m+=find_module.o
#obj-m+=test_module.o
#obj-m+=find_symbol.o
#obj-m+=module_is_live.o
#obj-m+=module_put.o
#obj-m+=module_refcount.o
#obj-m+=sprint_symbol.o
#obj-m+=try_module_get.o
#
#obj-m+=__task_pid_nr_ns.o
#obj-m+=find_pid_ns.o
#obj-m+=find_vpid.o
#obj-m+=get_pid.o
#obj-m+=get_task_mm.o
#obj-m+=ns_of_pid.o
#obj-m+=pid_nr.o
#obj-m+=pid_task.o
#obj-m+=pid_vnr.o
#obj-m+=task_active_pid_ns.o
#obj-m+=task_tgid_nr_ns.o
#obj-m+=__wake_up.o
obj-m+=__wake_up.o
obj-m+=__wake_up_sync.o
obj-m+=__wake_up_sync_key.o
obj-m+=add_wait_queue.o
obj-m+=add_wait_queue_exclusive.o
obj-m+=abort_exclusive_wait.o
obj-m+=autoremove_wake_function.o
obj-m+=complete.o
obj-m+=complete_all.o
obj-m+=complete_done.o
obj-m+=current_thread_info.o
obj-m+=default_wake_function.o
obj-m+=do_exit.o
obj-m+=finish_wait.o
obj-m+=init_waitqueue_entry.o





else

CC=gcc
#KERNELDIR:=/home/gg/huimu/bsp/linux-2.6.35.4
#KDIR:=/home/hh/work_imx6/linux-3.0.35
PWD :=$(shell pwd)
KVER :=$(shell uname -r)
#KDIR :=/home/gg/018_src/kernel/debian_kernel/linux-3.16.39
#KDIR :=/home/gg/018_src/kernel/linux-3.16.39
KDIR :=/lib/modules/$(KVER)/build

all:
	$(MAKE) -C $(KDIR) M=$(PWD)
#make -C $(KDIR) M=$(PWD) modules
clean:
	rm -rf *.o *.mod.c *.ko *.symvers *.order *.markers *~
endif

